<template>
  <div class="headerbox">
    <div class="hLeft">
      <p>造楼机智慧管控平台</p>
      <div class="en">Building machine intelligent control platform</div>
    </div>
    <div class="hRight">
      <div class="time">
        <p>19:01:32</p>
        <p>2022-12-29</p>
      </div>
      <div class="user">
        <el-icon class="userIcon"><User /></el-icon>
        <span>我的</span>
      </div>
      <div class="back" @click="router.push({name:'Staff'})">
        <el-icon class="userIcon"><DataLine /></el-icon>
        <span style="font-size: 14px;">管理<br/>后台</span>
      </div>
    </div>
  </div>
</template>

<script setup lang='ts'>
import { reactive, ref } from 'vue';
import { useRouter } from 'vue-router'

const router = useRouter()
</script>

<style lang='scss' scoped>
.headerbox{
  width: 100%;
  height: 108px;
  background: linear-gradient(to bottom, #5399B6, rgba(255, 255, 255, 0));
  display: flex;
  align-items: end;
  justify-content: space-between;
  position: absolute;
  padding: 0 45px;
  top: 0;
  left: 0;
  z-index: 2;
  .hLeft{
    width: 30%;
    color: #fff;
    & p:nth-child(1){
      font-size: 34px;
      font-weight: 100;
      white-space: nowrap;
    }
    .en{
      font-size: 22px;
      font-weight: 100;
      width: fit-content;
      height: 40px;
      border-bottom: 1px solid #fff;
      white-space: nowrap;
    }
  }
  .hRight{
    display: flex;
    align-items: center;
    color: #fff;
    padding-bottom: 20px;
    border-bottom: 1px solid #fff;
    .time{
      text-align: right;
      border-right: 2px solid #fff;
      padding-right:14px;
      margin-right: 18px;
      p:nth-child(1){
        font-size: 26px;
      }
      p:nth-child(2){
        font-size: 12px;
      }
    }
    .user{
      margin-right: 17px;
      border-right: 2px solid #fff;
      padding-right:17px;
      margin-right: 13px;
      cursor: pointer;
      span{
        font-size: 14px;
      }
    }
    .user,.back{
      display: flex;
      align-items: center;
      height: 100%;
      cursor: pointer;
    }
    .userIcon{
      font-size: 28px;
      margin-right: 13px;
    }
  }
}
</style>
